package com.example.voicebox.model;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;

import com.example.voicebox.BR;
import com.example.voicebox.tools.VoicePlayer;

public class VoiceBox extends BaseObservable{

    /**音频显示的名字*/
    private  String mName;
    /**
     * 音频经过SoundPool处理后的id
     * {@link VoicePlayer#loadVoice()}
     * */
    private Integer mSoundId;

    public void setName(String name){
        mName = name;
        notifyPropertyChanged(BR.name);
    }

    @Bindable
    public String getName() {
        return mName;
    }

    public void setSoundId(Integer soundId){
        mSoundId = soundId;
        notifyPropertyChanged(BR.soundId);
    }

    @Bindable
    public Integer getSoundId(){
        return mSoundId;
    }


}